package xyz.lne.researchgroupmanage.service.dataTransferObject;

import lombok.Data;
import xyz.lne.researchgroupmanage.entity.Task;

import java.util.Date;
import java.util.List;

/**
 * Designed By Lne.
 * 2021/1/18 14:16
 */
// 课题组
@Data
public class TaskDetailDTO {
    private Integer taskId;
    private String taskName;
    private Integer releaseUserId;
    private String releaseUserName;
    private String taskIntroduction;
    private Integer researchId;
    private String researchName;
    private Date createTime;

    private Integer accomplishedUsersNum;
    private Integer participatedUsersNum;

//    任务每个人完成的列表
    List<UserCommitTaskDTO> userCommitTaskDTOList;

    /**
     * 根据task来对TaskDetailDTO进行赋值
     * 注意：未对userName 、researchName 、人数 以及完成列表进行赋值
     * @param task
     */
    public TaskDetailDTO(Task task){
        this.taskId=task.getTaskId();
        this.taskName=task.getName();
        this.releaseUserId=task.getUserId();
        this.taskIntroduction=task.getIntroduction();
        this.researchId=task.getResearchId();
        this.createTime=task.getCreateTime();
    }

    public TaskDetailDTO(){

    }

}
